home *** CD-ROM | disk | FTP | other *** search
- global gVoid
-
- on FindSpriteProp maxSprite, propsToCheck, propToFind
- repeat with whichSprite = 1 to maxSprite
- if count(the scriptInstanceList of sprite whichSprite) then
- repeat with n = 1 to count(propsToCheck)
- set inputPropertyValue to getAt(propsToCheck, n)
- set propertyValueOfSprite to getaProp(sprite(whichSprite), getPropAt(propsToCheck, n))
- if not (inputPropertyValue = propertyValueOfSprite) then
- exit repeat
- end if
- end repeat
- if n > count(propsToCheck) then
- set propFound to getaProp(sprite(whichSprite), propToFind)
- if not voidp(propFound) then
- return propFound
- end if
- end if
- end if
- end repeat
- return gVoid
- end
-
- on SetSpriteProp maxSprite, propsToCheck, propToSet
- repeat with whichSprite = 1 to maxSprite
- if count(the scriptInstanceList of sprite whichSprite) then
- repeat with n = 1 to count(propsToCheck)
- set inputPropertyValue to getAt(propsToCheck, n)
- set propertyValueOfSprite to getaProp(sprite(whichSprite), getPropAt(propsToCheck, n))
- if not (inputPropertyValue = propertyValueOfSprite) then
- exit repeat
- end if
- end repeat
- if n > count(propsToCheck) then
- set property to getAt(propToSet, 1)
- set propertyValue to getAt(propToSet, 2)
- setaProp(sprite(whichSprite), property, propertyValue)
- end if
- end if
- end repeat
- end
-